package com.etoak.controller;

import com.etoak.entity.User;
import com.etoak.mapper.HelloMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class HelloController {

    @Autowired
    HelloMapper helloMapper;

    @RequestMapping("/{id}")
    public User getUser(@PathVariable int id) {
        return helloMapper.selectById(id);
    }
}
